<extend name="Layout/page_detail" />
<block name="content">
    {:W('PageHeader/adv_search',array('name'=>音视频设备管理,'search'=>'M'))}
	<form method="post" name="form_adv_search" id="form_adv_search">
		<div class="adv_search panel panel-default  display-none"  id="adv_search">
			<div class="panel-heading">
				<div class="row">
					<h4 class="col-xs-6">高级搜索</h4>
					<div class="col-xs-6 text-right">
						<a  class="btn btn-sm btn-info" onclick="submit_adv_search();">搜索</a>
						<a  class="btn btn-sm " onclick="close_adv_search();">关闭</a>
					</div>
				</div>
			</div>
			<div class="panel-body">
                
				<div class="form-group  col-sm-6">
                    <label class="col-sm-4 control-label" for="eq_name">名称：</label>
                    <div class="col-sm-8">
                        <input type="text" id="eq_name" name="eq_name" class="form-control">
                    </div>
                </div>                                                                
				<div class="form-group  col-sm-6">
                    <label class="col-sm-4 control-label" for="eq_edition">型号：</label>
                    <div class="col-sm-8">
                        <input type="text" id="eq_edition" name="eq_edition" class="form-control">
                    </div>
                </div>                                                                                                                
				<div class="form-group  col-sm-6">
                    <label class="col-sm-4 control-label" for="eq_startdate">启用时间：</label>
                    <div class="col-sm-8">
                        <input type="text" id="eq_startdate" name="eq_startdate" class="form-control input-date">
                    </div>
                </div>                
				<div class="form-group  col-sm-6">
                    <label class="col-sm-4 control-label" for="eq_storeman">保管员：</label>
                    <div class="col-sm-8">
                        <input type="text" id="eq_storeman" name="eq_storeman" class="form-control">
                    </div>
                </div>                                                                
            </div>
		</div>
	</form>
    <div class="operate panel panel-default">
        <div class="panel-body">
            <div class="pull-left">
                    <a class="btn btn-sm btn-danger" onclick="del();">删除</a>
            </div>
            <div class="pull-right">
                <a class="btn btn-sm btn-primary" onclick="add()">新建</a>
            </div>
        </div>
    </div>
	<div class="ul_table">
		<ul>
			<li class="thead">
				<div class="pull-left">
					<label class="inline pull-left col-3">
						<input class="ace" type="checkbox" name="id-toggle-all" id="id-toggle-all" />
						<span class="lbl"></span></label>
					<span class="col-10"> 名称 </span>
				</div>
				<div class="pull-right">
                    <span class="col-12"> 保管员 </span>
				</div>
				<div class="auto">
                    型号
				</div>
			</li>
            <empty name="list">
				<ul>
					<li class="no-data">
						没找到数据
					</li>
                    <else/>
					<form method="post" action="" name="form_data" id="form_data">
                        <foreach name="list" item="vo">
							<li class="tbody" >
								<div class="pull-left">
									<label class="inline pull-left col-3">
										<input class="ace" type="checkbox" name="id[]" value="{$vo.id}" />
										<span class="lbl"></span></label>
									<span class="col-10"> {$vo.name}</span>
								</div>
								<div class="pull-right">
                                    <span class="col-12">{$vo.storeman}
                                    </span>
								</div>
								<div class="auto">
                                    <a href="{:U('read','id='.$vo['id'])}" >{$vo.edition}
                                        <eq name="vo.edition|strlen" value="0">
										无内容
                                        </eq>
                                    </a>
								</div>
							</li>
						</foreach>
					</form>
					<div class="pagination">
                        {$page}
					</div>
                </ul>
			</empty>
		</ul>
	</div>
</block>
<block name="js">
<script type="text/javascript">
    function add() {
        window.open("{:U('add')}", "_self");
    }

    function del() {
        ui_confirm('确定要删除吗?', function() {
            var vars = $("#form_data").serialize();
            sendAjax("{:U('del')}", vars, function(data) {
                if (data.status) {
                    ui_alert(data.info, function() {
                        location.reload(true);
                    });
                }
            });
        });
    }
    $(document).ready(function() {
        set_return_url();

		fill_time("eq_startdate");
    });
</script>
</block>